package org.example.superb.util;

/**
 * Description:
 *
 * @Author maduar maduar@163.com
 * @Date 2022-06-24 21:12
 */
public class JacocoUtil {

    private JacocoUtil() {
    }

    public static boolean isPalindrome(String inputString) {
        if (inputString.length() == 0) {
            return true;
        } else {
            char firstChar = inputString.charAt(0);
            char lastChar = inputString.charAt(inputString.length() - 1);
            String mid = inputString.substring(1, inputString.length() - 1);
            return (firstChar == lastChar) && isPalindrome(mid);
        }
    }
}
